package Test.designmodel.abstractfactory;

/**
 * @Title: ecology-idea
 * @Company: 泛微软件
 * @author: weaver.Dusongsong
 * @version: 1.0
 * @CreateDate: 2022-06-09
 * @Description: ${description}
 * @ModifyLog:
 **/

public class AbstractFactoryTest {
    public static void main(String[] args) {
        try {
            AbstractFactory abstractFactory;
            Product1 product1;
            Product2 product2;
            abstractFactory = new ConcreteFactory1();
            product1 = abstractFactory.newProduct1();
            product2 = abstractFactory.newProduct2();
            product1.show();
            product2.show();
        }catch (Exception e){
            System.out.println(e.getMessage());
        }
    }
}
